home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / OpenTransport / Open Tpt Protocol Developer / Includes / OpenTptConfig.h next >
Encoding:
C/C++ Source or Header  |  1997-11-24  |  3.0 KB  |  114 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        OpenTptConfig.h
  3.  
  4.     Contains:    
  5.     
  6.     Copyright:    © 1995-1996 by Apple Computer, Inc., all rights reserved.
  7.  
  8.  
  9. */
  10.  
  11.  
  12. #ifndef __OPENTPTCONFIG__
  13. #define __OPENTPTCONFIG__
  14.  
  15. #ifndef __OPENTRANSPORT__
  16. #include <OpenTransport.h>
  17. #endif
  18.  
  19. #ifndef __FILES__
  20. #include <Files.h>
  21. #endif
  22.  
  23. #if GENERATING68K && defined(__MWERKS__)
  24. #pragma pointers_in_D0
  25. #endif
  26.  
  27. #if PRAGMA_ALIGN_SUPPORTED
  28. #pragma options align=mac68k
  29. #endif
  30. #if PRAGMA_IMPORT_SUPPORTED
  31. #pragma import on
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. /*******************************************************************************
  39. ** Implementing a Config library helper
  40. ** 
  41. ** These definitions should be used by port scanner developpers to provide
  42. ** a library giving information about the ports they register
  43. ********************************************************************************/
  44.  
  45.  
  46. /*    -------------------------------------------------------------------------
  47.     Library prefix: previx prepended to the string found in "fResourceInfo"
  48.     to build the actual library name.  Other prefixes may be defined in the
  49.     future to identify other types of extension libraries.
  50.     ------------------------------------------------------------------------- */
  51.  
  52.     #define kPortConfigLibPrefix    "OTPortCfg$"
  53.     
  54. /*    -------------------------------------------------------------------------
  55.     Library functions and IDs
  56.     ------------------------------------------------------------------------- */
  57.     //
  58.     // Returns the name of the port.  If includeSlot is true, the suffix "slot X"
  59.     // should be added.  If includePort is true, " port X" should be added for
  60.     // multiport cards.
  61.     //
  62.     #define kOTGetUserPortNameID    "OTGetUserPortName"
  63.     
  64.     typedef void (*OTGetPortNameProcPtr)(OTPortRecord*, boolean_p includeSlot,
  65.                                          boolean_p includePort, Str255 label);
  66.                                          
  67.     //
  68.     // Returns the location of the icon for the port.  Return false if no
  69.     // icon is provided.
  70.     //
  71.     #define kOTGetPortIconID    "OTGetPortIcon"
  72.     
  73.     typedef struct
  74.     {
  75.         FSSpec    fFile;
  76.         UInt16    fResID;
  77.     } OTResourceLocator;
  78.     
  79.     typedef Boolean (*OTGetPortIconProcPtr)(OTPortRecord*, OTResourceLocator* iconLocation);
  80.  
  81. /*******************************************************************************
  82. **    Application API
  83. **
  84. **    Calls that can be used by clients to get information about ports
  85. ********************************************************************************/
  86.  
  87. //    Returns a user friendly name for a port
  88. //
  89. void OTGetUserPortNameFromPortRef(OTPortRef ref, Str255 friendlyName);
  90.  
  91.  
  92. //    Returns the location for the icon familly representing the port.
  93. //    Returns false if the port has no icon
  94. //
  95. Boolean OTGetPortIconFromPortRef(OTPortRef ref, OTResourceLocator* iconLocation);
  96.  
  97. Boolean OTIsPortCompatibleWith(const OTPortRecord* port, char* protocolName);        //this line deleted for release disk
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101.  
  102. #if PRAGMA_ALIGN_SUPPORTED
  103. #pragma options align=reset
  104. #endif
  105. #if PRAGMA_IMPORT_SUPPORTED
  106. #pragma import off
  107. #endif
  108.  
  109. #if GENERATING68K && defined(__MWERKS__)
  110. #pragma pointers_in_A0
  111. #endif
  112.  
  113. #endif
  114.